# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'amt_v2.ui'
#
# Created: Mon Oct 12 02:27:28 2009
#      by: PyQt4 UI code generator 4.5.4
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui
from help_dialog import HelpDialog
from about_dialog import AboutDialog

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 641)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/cube.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.horizontalLayout_5 = QtGui.QHBoxLayout()
        self.horizontalLayout_5.setSizeConstraint(QtGui.QLayout.SetMaximumSize)
        self.horizontalLayout_5.setContentsMargins(-1, -1, 0, -1)
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.verticalLayout_4 = QtGui.QVBoxLayout()
        self.verticalLayout_4.setSpacing(5)
        self.verticalLayout_4.setSizeConstraint(QtGui.QLayout.SetFixedSize)
        self.verticalLayout_4.setContentsMargins(2, 1, 0, -1)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.label = QtGui.QLabel(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setObjectName("label")
        self.verticalLayout_4.addWidget(self.label)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setSpacing(6)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.objectSize = QtGui.QSpinBox(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.objectSize.sizePolicy().hasHeightForWidth())
        self.objectSize.setSizePolicy(sizePolicy)
        self.objectSize.setMaximumSize(QtCore.QSize(170, 20))
        self.objectSize.setMaximum(10)
        self.objectSize.setValue(5)
        self.objectSize.setMinimum(1)
        self.objectSize.setObjectName("objectSize")
        self.horizontalLayout_3.addWidget(self.objectSize)
        self.verticalLayout.addLayout(self.horizontalLayout_3)
        self.verticalLayout_4.addLayout(self.verticalLayout)
        self.line_3 = QtGui.QFrame(self.centralwidget)
        self.line_3.setFrameShape(QtGui.QFrame.HLine)
        self.line_3.setFrameShadow(QtGui.QFrame.Sunken)
        self.line_3.setObjectName("line_3")
        self.verticalLayout_4.addWidget(self.line_3)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.pushButtonPurple = QtGui.QPushButton(self.centralwidget)
        self.pushButtonPurple.setMaximumSize(QtCore.QSize(20, 20))
        self.pushButtonPurple.setStyleSheet("background-color:rgb(170, 0, 255)")
        self.pushButtonPurple.setObjectName("pushButtonPurple")
        self.horizontalLayout.addWidget(self.pushButtonPurple)
        self.pushButtonPink = QtGui.QPushButton(self.centralwidget)
        self.pushButtonPink.setMinimumSize(QtCore.QSize(0, 0))
        self.pushButtonPink.setMaximumSize(QtCore.QSize(20, 20))
        self.pushButtonPink.setStyleSheet("background-color: rgb(255, 0, 255);")
        self.pushButtonPink.setObjectName("pushButtonPink")
        self.horizontalLayout.addWidget(self.pushButtonPink)
        self.pushButtonGreen = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonGreen.sizePolicy().hasHeightForWidth())
        self.pushButtonGreen.setSizePolicy(sizePolicy)
        self.pushButtonGreen.setMaximumSize(QtCore.QSize(20, 20))
        self.pushButtonGreen.setStyleSheet("background-color: rgb(0, 170, 0);")
        self.pushButtonGreen.setObjectName("pushButtonGreen")
        self.horizontalLayout.addWidget(self.pushButtonGreen)
        self.pushButtonGray = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonGray.sizePolicy().hasHeightForWidth())
        self.pushButtonGray.setSizePolicy(sizePolicy)
        self.pushButtonGray.setMaximumSize(QtCore.QSize(20, 20))
        self.pushButtonGray.setStyleSheet("background-color: rgb(132, 132, 132);")
        self.pushButtonGray.setObjectName("pushButtonGray")
        self.horizontalLayout.addWidget(self.pushButtonGray)
        self.pushButtonRed = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonRed.sizePolicy().hasHeightForWidth())
        self.pushButtonRed.setSizePolicy(sizePolicy)
        self.pushButtonRed.setMaximumSize(QtCore.QSize(20, 20))
        self.pushButtonRed.setStyleSheet("""background-color: rgb(255, 0, 0);""")
        self.pushButtonRed.setObjectName("pushButtonRed")
        self.horizontalLayout.addWidget(self.pushButtonRed)
        self.pushButtonYellow = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonYellow.sizePolicy().hasHeightForWidth())
        self.pushButtonYellow.setSizePolicy(sizePolicy)
        self.pushButtonYellow.setMaximumSize(QtCore.QSize(20, 20))
        self.pushButtonYellow.setStyleSheet("background-color: rgb(255, 255, 0);")
        self.pushButtonYellow.setObjectName("pushButtonYellow")
        self.horizontalLayout.addWidget(self.pushButtonYellow)
        self.pushButtonOrange = QtGui.QPushButton(self.centralwidget)
        self.pushButtonOrange.setMaximumSize(QtCore.QSize(20, 20))
        self.pushButtonOrange.setStyleSheet("background-color: rgb(255, 170, 0);")
        self.pushButtonOrange.setObjectName("pushButtonOrange")
        self.horizontalLayout.addWidget(self.pushButtonOrange)
        self.verticalLayout_4.addLayout(self.horizontalLayout)
        self.line = QtGui.QFrame(self.centralwidget)
        self.line.setFrameShape(QtGui.QFrame.HLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout_4.addWidget(self.line)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.pushButtonClear = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonClear.sizePolicy().hasHeightForWidth())
        self.pushButtonClear.setSizePolicy(sizePolicy)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/icons/clear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonClear.setIcon(icon1)
        self.pushButtonClear.setObjectName("pushButtonClear")
        self.horizontalLayout_2.addWidget(self.pushButtonClear)
        self.pushButtonCenter = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonCenter.sizePolicy().hasHeightForWidth())
        self.pushButtonCenter.setSizePolicy(sizePolicy)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/icons/center.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonCenter.setIcon(icon2)
        self.pushButtonCenter.setObjectName("pushButtonCenter")
        self.horizontalLayout_2.addWidget(self.pushButtonCenter)
        self.pushButtonRemove = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButtonRemove.sizePolicy().hasHeightForWidth())
        self.pushButtonRemove.setSizePolicy(sizePolicy)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(":/icons/remove.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButtonRemove.setIcon(icon3)
        self.pushButtonRemove.setObjectName("pushButtonRemove")
        self.horizontalLayout_2.addWidget(self.pushButtonRemove)
        self.verticalLayout_4.addLayout(self.horizontalLayout_2)
        self.label_4 = QtGui.QLabel(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
        self.label_4.setSizePolicy(sizePolicy)
        self.label_4.setMaximumSize(QtCore.QSize(178, 16777215))
        self.label_4.setObjectName("label_4")
        self.verticalLayout_4.addWidget(self.label_4)
                
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_4.addItem(spacerItem)
        self.horizontalLayout_5.addLayout(self.verticalLayout_4)
        self.glwidget = GlWidget(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.glwidget.sizePolicy().hasHeightForWidth())
        self.glwidget.setSizePolicy(sizePolicy)
        self.glwidget.setMouseTracking(False)
        self.glwidget.setFocusPolicy(QtCore.Qt.TabFocus)
        self.glwidget.setObjectName("glwidget")
        self.horizontalLayout_5.addWidget(self.glwidget)
        self.verticalLayout_2.addLayout(self.horizontalLayout_5)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 641, 22))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuHelp = QtGui.QMenu(self.menubar)
        self.menuHelp.setObjectName("menuHelp")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionQuit = QtGui.QAction(MainWindow)
        self.actionQuit.setObjectName("actionQuit")
        self.actionManual = QtGui.QAction(MainWindow)
        self.actionManual.setObjectName("actionManual")
        self.actionAbout = QtGui.QAction(MainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.actionQuit_2 = QtGui.QAction(MainWindow)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(":/icons/exit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionQuit_2.setIcon(icon4)
        self.actionQuit_2.setObjectName("actionQuit_2")
        self.actionAMT_Help = QtGui.QAction(MainWindow)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(":/icons/help_icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionAMT_Help.setIcon(icon5)
        self.actionAMT_Help.setObjectName("actionAMT_Help")
        self.actionClear = QtGui.QAction(MainWindow)
        self.actionClear.setObjectName("actionClear")
        self.actionReset = QtGui.QAction(MainWindow)
        self.actionReset.setObjectName("actionReset")
        self.actionNew = QtGui.QAction(MainWindow)
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap(":/icons/add.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionNew.setIcon(icon6)
        self.actionNew.setIconVisibleInMenu(True)
        self.actionNew.setObjectName("actionNew")
        self.actionAbout_2 = QtGui.QAction(MainWindow)
        icon7 = QtGui.QIcon()
        icon7.addPixmap(QtGui.QPixmap(":/icons/about.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionAbout_2.setIcon(icon7)
        self.actionAbout_2.setObjectName("actionAbout_2")
        self.menuFile.addAction(self.actionNew)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionQuit_2)
        self.menuHelp.addAction(self.actionAMT_Help)
        self.menuHelp.addSeparator()
        self.menuHelp.addAction(self.actionAbout_2)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())
             
        self.retranslateUi(MainWindow)
        QtCore.QObject.connect(self.actionQuit_2, QtCore.SIGNAL("triggered()"), MainWindow.close)
        QtCore.QObject.connect(self.pushButtonGray, QtCore.SIGNAL("clicked()"), self.glwidget.set_gray_color)
        QtCore.QObject.connect(self.pushButtonGreen, QtCore.SIGNAL("clicked()"), self.glwidget.set_green_color)
        QtCore.QObject.connect(self.pushButtonOrange, QtCore.SIGNAL("clicked()"), self.glwidget.set_orange_color)
        QtCore.QObject.connect(self.pushButtonPink, QtCore.SIGNAL("clicked()"), self.glwidget.set_pink_color)
        QtCore.QObject.connect(self.pushButtonPurple, QtCore.SIGNAL("clicked()"), self.glwidget.set_purple_color)
        QtCore.QObject.connect(self.pushButtonRed, QtCore.SIGNAL("clicked()"), self.glwidget.set_red_color)
        QtCore.QObject.connect(self.pushButtonYellow, QtCore.SIGNAL("clicked()"), self.glwidget.set_yellow_color)
        QtCore.QObject.connect(self.pushButtonClear, QtCore.SIGNAL("clicked()"), self.glwidget.clear_scene)
        QtCore.QObject.connect(self.pushButtonCenter, QtCore.SIGNAL("clicked()"), self.glwidget.center_scene)
        QtCore.QObject.connect(self.pushButtonRemove, QtCore.SIGNAL("clicked()"), self.glwidget.remove_object)
        QtCore.QObject.connect(self.actionNew, QtCore.SIGNAL("triggered()"), self.glwidget.clear_scene)
        QtCore.QObject.connect(self.objectSize, QtCore.SIGNAL("valueChanged(int)"), self.set_size)
        QtCore.QObject.connect(self.actionAMT_Help, QtCore.SIGNAL("triggered()"), self.open_help)
        QtCore.QObject.connect(self.actionAbout_2, QtCore.SIGNAL("triggered()"), self.open_about)
        
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
    
    def set_size(self):
        '''
        Defines the size of the object that will be created.
        '''        
        self.glwidget._object_size = self.objectSize.value()
        
    def open_help(self):
        '''
        Opens the help.
        '''
        object = HelpDialog()
        object.exec_()
    
    def open_about(self):
        '''
        Opens the help
        '''
        object = AboutDialog()
        object.exec_()
        
        
    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "AMT CG WORK", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p align=\"justify\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt; font-weight:600; color:#00007f;\">Create New Object</span></p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
        self.label_4.setText(QtGui.QApplication.translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"</body></html>", None, QtGui.QApplication.UnicodeUTF8))
        self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8))
        self.menuHelp.setTitle(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8))
        self.actionQuit.setText(QtGui.QApplication.translate("MainWindow", "Quit", None, QtGui.QApplication.UnicodeUTF8))
        self.actionManual.setText(QtGui.QApplication.translate("MainWindow", "Manual", None, QtGui.QApplication.UnicodeUTF8))
        self.actionAbout.setText(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8))
        self.actionQuit_2.setText(QtGui.QApplication.translate("MainWindow", "Quit", None, QtGui.QApplication.UnicodeUTF8))
        self.actionAMT_Help.setText(QtGui.QApplication.translate("MainWindow", "AMT Help", None, QtGui.QApplication.UnicodeUTF8))
        self.actionClear.setText(QtGui.QApplication.translate("MainWindow", "Clear", None, QtGui.QApplication.UnicodeUTF8))
        self.actionReset.setText(QtGui.QApplication.translate("MainWindow", "Reset", None, QtGui.QApplication.UnicodeUTF8))
        self.actionNew.setText(QtGui.QApplication.translate("MainWindow", "New", None, QtGui.QApplication.UnicodeUTF8))
        self.actionAbout_2.setText(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8))

    
from glwidget import GlWidget
import images_rc
